package com.xcfw.dorm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 表装返回对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ReturnJson implements Serializable {
    /**
     * 状态码
     */
    private int status;
    /**
     * 信息
     */
    private String msg;
    /**
     * 返回值
     */
    private Object result;
    /**
     * 总数
     */
    private long total;
    /**
     * 接口名称
     */
    private String connector;

    public ReturnJson(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public ReturnJson(int status, String msg, Object result) {
        this.status = status;
        this.msg = msg;
        this.result = result;
    }

    public ReturnJson(int status, String msg, Object result, long total) {
        this.status = status;
        this.msg = msg;
        this.result = result;
        this.total = total;
    }
}
